Skip to content

docs(level-factors): name SP/RW adjusters as baseline-predictor associations (#389 finding 5) - #447

Open
ethanbuckley wants to merge 1 commit into
mainfrom
feat/lrp389-lf-baseline-labels
Open

docs(level-factors): name SP/RW adjusters as baseline-predictor associations (#389 finding 5)#447
ethanbuckley wants to merge 1 commit into
mainfrom
feat/lrp389-lf-baseline-labels

Conversation

@ethanbuckley

Copy link
Copy Markdown
Contributor

Note

Drafted by an LLM-based AI tool (Claude Code/Opus 4.8).

Third tranche of #389finding 5, an independent doc change off main (touches only _results_factors.qmd, which #445/#446 don't modify, so it can merge in any order).

The issue

In the factor families the speech-accuracy (deapp_c) and phonological-memory (erbto) adjusters are read at the child's baseline (t1) value — deliberately, so the randomised contrast is not conditioned on a treatment-affected descendant of the intervention (#247 timing). Their coefficients are therefore baseline-predictor associations, not contemporaneous per-wave factors, and the level report didn't say so.

The change

A single term-gated note in the shared _results_factors.qmd (rendered by the gain and level families), placed just after the "Adjusted associations — not causal" callout. It names the speech-accuracy / phonological-memory adjusters as baseline predictors only where they actually appear in the factor summary, and stays silent for models without them — so reports that carry no such adjuster are byte-identical.

Correct for both families (both baseline-time SP/RW per #247), so it's a faithful clarification, not a level-only quirk bolted onto a shared partial.

Verification

  • The new output: asis block's logic checked standalone for the both / one / none cases (prints only when a flagged term is present);
  • all 15 fenced Python blocks in the partial compile;
  • npm run format:check and npm run spellcheck clean;
  • no test guards this partial's content.

#389 status

Assigning to a human for review and merge.

…ssociations (#389 finding 5)

In the factor families the speech-accuracy (deapp_c) and phonological-memory (erbto)
adjusters are read at the child's baseline (t1) value so the randomised contrast is
not conditioned on a treatment-affected descendant (#247 timing). Their coefficients
are therefore baseline-predictor associations, not contemporaneous per-wave factors
-- a distinction the level report did not state.

Add a term-gated note to the shared _results_factors.qmd (rendered by the gain and
level families) that names these adjusters as baseline predictors wherever they
appear in the factor summary, and stays silent for models without them. Correct for
both families (both baseline-time SP/RW per #247); no other report changes.

Addresses #389 finding 5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Clarifies how the factor-family reports should interpret the speech-accuracy (deapp_c) and phonological-memory (erbto) adjusters by explicitly stating they are baseline (t1) predictor associations (to avoid post-treatment adjustment) rather than contemporaneous per-wave factors, and only emitting the note when those terms actually appear in factor_summary.csv.

Changes:

  • Add an output: asis Quarto Python block that detects gamma_deapp_c / gamma_erbto in factor_summary and prints a timing/interpretation note.
  • Keep the note term-gated so reports without these adjusters remain byte-identical.

Comment on lines +233 to +251
if factor_summary is not None and "term" in factor_summary.columns:
_terms = set(factor_summary["term"].astype(str))
_baseline_adj = {
"gamma_deapp_c": "speech accuracy",
"gamma_erbto": "phonological memory (nonword repetition)",
}
_present = [lbl for t, lbl in _baseline_adj.items() if t in _terms]
if _present:
_names = " and ".join(_present)
_plural = len(_present) > 1
print(
f"\n_Timing of the {_names} adjuster{'s' if _plural else ''}:_ read at "
f"the child's **baseline (t1)** value — so the randomised contrast is not "
f"conditioned on a treatment-affected descendant of the intervention "
f"(#247 timing) — {'these are' if _plural else 'so this is'} a "
f"**baseline-predictor association** applied across all of a child's "
f"observations, **not** a contemporaneous per-wave factor. Hearing, being "
f"exogenous, is read contemporaneously instead."
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants